import request from '@/utils/request'


// 查询菜单下拉树结构
export function treeselect(query) {
  return request({
    url: '/wechat/employeepeople/treeselect',
    method: 'get',
    params: query
  })
}
// 查询从业人员列表
export function listEmployeepeople(query) {
  return request({
    url: '/wechat/employeepeople/list',
    method: 'get',
    params: query
  })
}

// 查询从业人员详细
export function getEmployeepeople(employeePeopleId) {
  return request({
    url: '/wechat/employeepeople/' + employeePeopleId,
    method: 'get'
  })
}
// 用户状态修改
export function changeRecommendStatus(employeePeopleId, isRecommend) {
  const data = {
    employeePeopleId,
    isRecommend
  }
  return request({
    url: '/wechat/employeepeople/changeRecommend',
    method: 'put',
    data: data
  })
}
// 新增从业人员
export function addEmployeepeople(data) {
  return request({
    url: '/wechat/employeepeople',
    method: 'post',
    data: data
  })
}

// 修改从业人员
export function updateEmployeepeople(data) {
  return request({
    url: '/wechat/employeepeople',
    method: 'put',
    data: data
  })
}

// 删除从业人员
export function delEmployeepeople(employeePeopleId) {
  return request({
    url: '/wechat/employeepeople/' + employeePeopleId,
    method: 'delete'
  })
}

// 导出从业人员
export function exportEmployeepeople(query) {
  return request({
    url: '/wechat/employeepeople/export',
    method: 'get',
    params: query
  })
}